package com.campus.delivery.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.campus.common.mybatis.entity.IntegerIdBaseEntity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 订单商品表
 * </p>
 *
 * @author ZhaoYuJie
 * @since 2025-05-12
 */
@Getter
@Setter
@TableName("order_goods")
@ApiModel(value = "OrderGoods对象", description = "订单商品表")
public class OrderGoods extends IntegerIdBaseEntity<OrderGoods> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("订单ID")
    @TableField("order_id")
    private String orderId;

    @ApiModelProperty("商品ID")
    @TableField("goods_id")
    private Integer goodsId;

    @ApiModelProperty("商品名称")
    @TableField("name")
    private String name;

    @ApiModelProperty("商品价格")
    @TableField("price")
    private BigDecimal price;

    @ApiModelProperty("商品图片")
    @TableField("image")
    private String image;

    @ApiModelProperty("规格信息")
    @TableField("specifications")
    private String specifications;

    @ApiModelProperty("数量")
    @TableField("quantity")
    private Integer quantity;

    @ApiModelProperty("小计")
    @TableField("subtotal")
    private BigDecimal subtotal;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @Override
    public Serializable pkVal() {
        return null;
    }
}
